package com.maduar.batch.quartz;

import lombok.extern.log4j.Log4j2;
import lombok.extern.slf4j.Slf4j;
import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;

import java.time.LocalDateTime;
import java.util.Date;

/**
 * Description:
 *
 * @Author maduar maduar@163.com
 * @Date 2021-07-11 22:29
 */
@Log4j2
public class HelloJob implements Job {

    private int _counter;

    @Override
    public void execute(JobExecutionContext context) throws JobExecutionException {
        _counter++;
        log.info("count: {}", _counter);
        log.info(LocalDateTime.now().toString());
        log.info("正在抓取job: {}", context);
    }
}
